-
Notifications
You must be signed in to change notification settings - Fork 16
Productionize claims_hosp #1408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Updates deployment playbooks for prod and staging to handle the possibility of a `secrets.py` file. - Updates vars and vault files with new variable pointers and encryption. - Adds a new template file that will be rendered as `secrets.py` in the root of the indicators directory.
- Adds new Python and shell scripts to automate `hosp_claims` indicator. - Adds a symlink for `secrets.py`.
krivard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this still has a ways to go before it's ready to deploy
Co-authored-by: Katie Mazaitis <krivard@cs.cmu.edu>
|
@mariajahja Can you take a quick pass through this, maybe check out those comment-cleanup questions? |
| sanity_check() { | ||
| geo=$1 | ||
| cd "$AUTO_DIR" || exit | ||
| python3 sanity_checks.py "$RECEIVING_DIR" "$geo" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This script performs very basic sanity checks (e.g. percentages between 0 and 100) and can also produce some plots contrasting the new values to ones in the API (see a few line below). If there is a separate validation script run on other indicators such as claims, it would be better to use that and remove this.
Co-authored-by: Katie Mazaitis <krivard@cs.cmu.edu>
…idcast-indicators into productionize-claims_hosp
|
@korlaxxalrok @krivard Could you help me with resolving the conflicts in |
|
I'll fix the vault; we had an update to the safegraph secrets while this PR was in flight |
qx-teo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good on the validator end!
krivard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- question on need for force parameter
- additional information needed in final log statement
Co-authored-by: Katie Mazaitis <krivard@cs.cmu.edu>
krivard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Way closer! Two minor items to resolve.
claims_hosp/.pylintrc
Outdated
| # Allow pytest classes to have one test. | ||
| too-few-public-methods | ||
| too-few-public-methods, | ||
| broad-except |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jingjtang why is broad-except needed?
@krivard It's for this warning: There can be multiples types of exception error (IndexError, ValueError, ..) if we run into unexpected names |
Remove try/except from get_timestamp by converting to re
krivard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@korlaxxalrok is any preparation needed before we merge this or can I click the big green button at will?
|
@krivard Looks reasonable. As best I can tell we won't need any prep, but imo best path is to merge and test 👍 |
Description
Adds the necessary Ansible bits and scripts to deploy
claims_hosplike an indicator while keeping intact its current automation routines.Changelog
secrets.pyfile into an indicator's root directory.Start from Jingjing
delphi_claims_hosp.HospClaimscould be dropped. But didn't do that currently just for a backup.run.py./retrieve_files. All the raw files will be deleted after a production runFixes
Fixes #1623